using System;
using PCC.App;

namespace PCC.Receiver.Database
{
    public class CreateUser : AbstractDatabaseReceiver
    {
        private readonly string _username;
        private readonly string _password;
        private readonly string _email;
        private readonly string _passwordQuestion;
        private readonly string _passwordAnswer;
        private readonly Guid _userId;

        public CreateUser(DataManager dataManager, string username, string password, string email, string passwordQuestion, string passwordAnswer, Guid userId)
            : base(dataManager)
        {
            _username = username;
            _password = password;
            _email = email;
            _passwordQuestion = passwordQuestion;
            _passwordAnswer = passwordAnswer;
            _userId = userId;
        }

        public override void Action()
        {
            _dataManager.CreateUser(_userId, _username, _password, _email, _passwordQuestion, _passwordAnswer);
        }
    }
}